package com.wyz.saas.common.gnss

import android.content.Context
import android.location.LocationListener
import com.wyz.saas.common.gnss.AtomLocationController
import com.wyz.saas.common.gnss.AtomLocationManager

class ContinuedLocationListener : AtomLocationController {

    private val ctx: Context
    private val manager: AtomLocationManager
    private val listener: LocationListener

    constructor(ctx: Context, listener: LocationListener) {
        this.ctx = ctx
        this.manager = AtomLocationManager(ctx , listener)
        this.listener = listener
    }

    override fun request(): AtomLocationController {
        this.manager.request()
        return this
    }

    override fun destroy(): AtomLocationController {
        this.manager.destroy()
        return this
    }
}